package com.test.spring4;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationClient {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AnnotationScan.class);
		System.out.println(context.getBean(MyBean.class));
    	System.out.println(context.getBean("myBean"));
    	//System.out.println(context.getBean(UserController.class));//此bean被排除  
    	
		context.close();
	}
}
